package com.jeecg.school.service.impl;
import com.jeecg.school.service.StudentServiceI;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;

import com.jeecg.school.dao.IStudentDao;
import com.jeecg.school.entity.StudentEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.io.IOException;
import java.io.Serializable;
import org.jeecgframework.core.util.ApplicationContextUtil;
import org.jeecgframework.core.util.MyClassLoader;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;

import org.jeecgframework.minidao.util.FreemarkerParseFactory;
import org.springframework.beans.factory
.annotation.Autowired;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.jeecgframework.core.util.ResourceUtil;

@Service("studentService")
@Transactional
public class StudentServiceImpl extends CommonServiceImpl implements StudentServiceI {

	@Autowired
	private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
	
	@Autowired
	private IStudentDao studentDao;
	
 	public void delete(StudentEntity entity) throws Exception{
 		super.delete(entity);
 	}
 	
 	public Serializable save(StudentEntity entity) throws Exception{
 		Serializable t = super.save(entity);
 		return t;
 	}
 	
 	public void saveOrUpdate(StudentEntity entity) throws Exception{
 		super.saveOrUpdate(entity);
 	}

	@Override
	public long getStudentCount() throws Exception {
		// TODO Auto-generated method stub
		return studentDao.getStudentCount();
	}

	@Override
	public int getStudentCountByTeacher(Map<String, String> param) throws IOException {
		// TODO Auto-generated method stub
		return studentDao.getStudentCountByTeacher(param);
	}

	@Override
	public List<StudentEntity> queryListByTeacher(Map<String, String> param) throws IOException {
		// TODO Auto-generated method stub
		return studentDao.queryListByTeacher(param);
	}
 	
}